<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
</head>
<body>

<div th:fragment="nav">
    <!-- 导航栏-->
    <div style="border:2px slateblue solid">
        <h2 align="center">基于SpringBoot2.7.x MyBatis2.3.x Thymeleaf 的学生成绩简易系统-Mark5</h2>
        <hr>
        <div style="display: flex; justify-content: space-between">
            <h4><a href="/mark5/go2login">学生成绩简易系统-首页</a></h4>
            <div  style="width: 50%; display: flex;  align-content: right;  justify-content: space-between; padding-top: 12px">
                <p th:if="${ session.user== null}" style="color: #aabec5">
                    未登录</p>
                <p  th:if="${ session.user!= null}"style="color: orangered">
                    已登录</p>
                <p style="color: blue" >姓名:
                    <span th:if="${session.user!=null}" th:text="${session.user.uname}"></span></p>
                <p style="color: blueviolet">角色:<span th:if="${session.user!=null}" th:text="${session.user.role}"></span></p>

            </div>
            <p style="color: blue"><a href="/mark5/logout.do">退出</a></p>
            <div th:if="${session.user!= null}" style="width: 5vw; height: 5vw">
                <img style="height: 90%; width: 100% " th:src="'/mark5/showimg/'+ ${session.user.pic}"/>
            </div>
            <p>&nbsp;</p>
        </div>
    </div>
    <!--<hr>-->
</div>

<div th:if="${session.user!=null }">
    <div th:if="${session.user.role=='tea'|| session.user.role=='stu'}">
<div style="display: flex; justify-content: space-between">
    <!--登录窗口-->
    <div style="width: 35%; display: flex; justify-content: space-between">
        <div style="margin-left: 2%; width: 90%">
            <h3 align="center">修改密码</h3>

            <table  width="90%" border="1" cellspacing="0" style="line-height: 36px">
                <form action='/mark5/updpwd' method='post'>
                    <tr align="center">
                        <td>手机号:</td>
                        <!--readonly 只读-->
                        <td><input type='text' name='phone'  readonly  th:value="${session.user.phone}"></td>
                    </tr>
                    <tr align="center">
                        <td>密码:</td>
                        <td><input type='password' name='pwd'></td>
                    </tr>
                    <tr align="center">
                        <td>二次密码:</td>
                        <td><input type='password' name='pwd2'></td>
                    </tr>
                    <tr align="center">
                        <td></td>
                        <td><input type='submit' value='确认修改'></td>
                    </tr>
                </form>
            </table>
            <h4    style="color: red" align="center"  th:text="${err}"></h4>
        </div>
    </div>
</div></div></div>
</body>
</html>